package myJs.tool

import upickle.default._

/**
 * Created by yz on 8/10/2021
 */
object Pojo {

  case class FilterContentData(fieldName: String, label: String, values: List[String] = List[String]())

  trait SearchKind

  object TextSearch extends SearchKind

  object DateSearch extends SearchKind

  object NumericSearch extends SearchKind

  object DoubleSearch extends SearchKind

  object CheckboxSearch extends SearchKind

  trait SearchData

  case class TextSearchData(searchType: String, text: String) extends SearchData

  case class DateSearchData(startDate: String, endDate: String) extends SearchData

  case class NumericSearchData(min: String, max: String, kind: String) extends SearchData

  case class CheckboxSearchData(values: List[String]) extends SearchData

  case class SortData(field: String, order: String, kind: String)

  case class TpmData(geneName: String, shoot: Double, leaf: Double, flower: Double)

  object TpmData {

    implicit val rw = macroRW[TpmData]

  }

  case class Basic344TpmData(geneId: String, value: ujson.Value)

  object Basic344TpmData {

    implicit val rw = macroRW[Basic344TpmData]

  }

}
